<?php 
	require_once("../dompdf/dompdf_config.inc.php");
	$conexion = mysql_connect("localhost","root","");
	mysql_select_db("limasys-bd",$conexion);

$codigoHTML='
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Lista</title>
</head>

<body>
<div align="left"><img src="../imagenes/ctp.png" width="55" height="80"/></div>



<div align="center">
   <h4 align="center">Listado de Estudiantes</h4>
    <table width="100%" border="1">
      <tr>
        <td bgcolor="#0099FF"><strong>Cedula</strong></td>
        <td bgcolor="#0099FF"><strong>Nombre</strong></td>
        <td bgcolor="#0099FF"><strong>Apellido 1</strong></td>
        <td bgcolor="#0099FF"><strong>Apellido 2</strong></td>
        <td bgcolor="#0099FF"><strong>Fecha Nacimiento </strong></td>
        <td bgcolor="#0099FF"><strong>Sexo</strong></td>
        <td bgcolor="#0099FF"><strong>Grado</strong></td>
        <td bgcolor="#0099FF"><strong>Seccion</strong></td>
         <br> </br>
 		<div align="right"><img src="../imagenes/limasys.png" width="50" height="50"/></div>
      </tr>';

        $consulta=mysql_query("SELECT LS00IDUS,`LS03NB`,`LS04AP1`,`LS05AP2`,`LS06FN`,`LS07GN`,`LS08NV`,`LS09SC` 
        						FROM `ls_02_usuarios` WHERE `LS08NV`='8' ORDER BY `LS08NV`,`LS09SC`");

        while($dato=mysql_fetch_array($consulta)){

$codigoHTML.='
      <tr>
        <td>'.$dato['LS00IDUS'].'</td>
        <td>'.$dato['LS03NB'].'</td>
        <td>'.$dato['LS04AP1'].'</td>
        <td>'.$dato['LS05AP2'].'</td>
        <td>'.$dato['LS06FN'].'</td>
        <td>'.$dato['LS07GN'].'</td>
        <td>'.$dato['LS08NV'].'</td>
        <td>'.$dato['LS09SC'].'</td>
      </tr>';
      } 
$codigoHTML.='
    </table>
</div>
</body>
</html>';

$codigoHTML=utf8_decode($codigoHTML);
$dompdf=new DOMPDF();
$dompdf->load_html($codigoHTML);
ini_set("memory_limit","128M");
$dompdf->render();
$dompdf->stream("ListadoEstudiantes8.pdf");
?>